﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DemoForGit1
{
    public partial class FrmMain : Form
    {
        //游戏对象说明
        private Game _game;
        private string str = "";
        private double player = 0.0;
        private double computer = 0.0;

        private int nTurns = 0;//记录是谁的回合，初始为玩家

        private int n1 = 4;//限制玩家最多可以翻牌4次
        private int n2 = 3;//限制玩家最多可以翻牌3次

        private Random rd = new Random();

        private bool isStart = true;
        public FrmMain()
        {
            InitializeComponent();
        }

        private void gameArea_Load(object sender, EventArgs e)
        {
            _game = new Game();
            this.gameArea.Invalidate();

            listBox1.Items.Add("游戏开始");
            listBox1.Items.Add("玩家翻牌阶段（次数：4）");
        }

        private void gameArea_Paint(object sender, PaintEventArgs e)
        {
            if (_game != null)//游戏已经初始化了
            {
                _game.Draw(e.Graphics, this.gameArea.Size);
                
            }
        }
       
    }
}
